<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Catalago de Obras - Grupo 25: Referência do Arquivo inserir.c</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Gerado por Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Estruturas&nbsp;de&nbsp;Dados</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Referência do Arquivo inserir.c</h1><code>#include &quot;<a class="el" href="inserir_8h-source.html">inserir.h</a>&quot;</code><br>

<p>
<div class="dynheader">
Gráfico de dependência de inclusões para inserir.c:</div>
<div class="dynsection">
<p><center><img src="inserir_8c__incl.png" border="0" usemap="#inserir.c_map" alt=""></center>
<map name="inserir.c_map">
<area shape="rect" href="inserir_8h.html" title="inserir.h" alt="" coords="189,84,261,110"><area shape="rect" href="remove_8h.html" title="remove.h" alt="" coords="183,161,268,188"><area shape="rect" href="consulta_8h.html" title="consulta.h" alt="" coords="180,238,271,265"></map>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Funções</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#3984be3dc5afb73ad6b108f75442d6ec">verifica_avail</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#09e188938102b40356eb2042f8237316">insere</a> (int tamanho, FILE *base, char tit[], <a class="el" href="structNo__PK.html">pNo_PK</a> *obras)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4">completa_espacos</a> (char nome[], int tamanho)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125">remove_espacos</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#00c6be1b80810a935f1185dc4c2dc32b">verifica</a> (int tamanho, char *string)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#9c79d622ec1a91518808ee0a01f04095">verifica_img</a> (int tamanho, char imagem[])</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#c2f31d719ada641e76a5f5192bda2c38">Titulo</a> (<a class="el" href="structNo__PK.html">pNo_PK</a> obras, char *novo, FILE *dados, int tamanho_vetor)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#86f4c9d5af1f3c351dfd4989c7e0e050">Tipo</a> (FILE *dados)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#1f918dc0c11be8136b10639811b30ff0">Autor</a> (FILE *dados)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#7c4ee3b9d090de7debc8627a9ec467b9">Ano</a> (FILE *dados)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#f3d37b1e5047923e2f386e2d6e035173">Valor</a> (FILE *dados)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="inserir_8c.html#17f1761d7fa8ca9ebd96b0e43d43f141">Imagem</a> (FILE *dados)</td></tr>

</table>
<hr><h2>Funções</h2>
<a class="anchor" name="7c4ee3b9d090de7debc8627a9ec467b9"></a><!-- doxytag: member="inserir.c::Ano" ref="7c4ee3b9d090de7debc8627a9ec467b9" args="(FILE *dados)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Ano           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dados</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00216"></a>00216                                 : <span class="stringliteral">", tam_ano);</span>
<a name="l00217"></a>00217 <span class="stringliteral">        remove_espacos();</span>
<a name="l00218"></a>00218 <span class="stringliteral">        fgets(ano, tam_ano+2, stdin);</span>
<a name="l00219"></a>00219 <span class="stringliteral">        j = verifica(tam_ano, ano);</span>
<a name="l00220"></a>00220 <span class="stringliteral">        while(ano[0] == '\n' || j != 0) {</span>
<a name="l00221"></a>00221 <span class="stringliteral"></span>
<a name="l00222"></a>00222 <span class="stringliteral">                j=0;</span>
<a name="l00223"></a>00223 <span class="stringliteral">                printf("</span>Entrada invalida, redigite por favor.\n<span class="stringliteral">");</span>
<a name="l00224"></a>00224 <span class="stringliteral">                printf("</span><a class="code" href="inserir_8c.html#7c4ee3b9d090de7debc8627a9ec467b9">Ano</a> (%d numeros): <span class="stringliteral">", tam_ano);</span>
<a name="l00225"></a>00225 <span class="stringliteral">                remove_espacos();</span>
<a name="l00226"></a>00226 <span class="stringliteral">                fgets(ano, tam_ano+2, stdin);</span>
<a name="l00227"></a>00227 <span class="stringliteral">                __fpurge(stdin);</span>
<a name="l00228"></a>00228 <span class="stringliteral">                j = verifica(tam_ano, ano);</span>
<a name="l00229"></a>00229 <span class="stringliteral">        }</span>
<a name="l00230"></a>00230 <span class="stringliteral"></span>
<a name="l00231"></a>00231 <span class="stringliteral">        completa_espacos(ano, tam_ano);</span>
<a name="l00232"></a>00232 <span class="stringliteral"></span>
<a name="l00233"></a>00233 <span class="stringliteral">        __fpurge(stdin);</span>
<a name="l00234"></a>00234 <span class="stringliteral">        fputs(ano, dados);</span>
<a name="l00235"></a>00235 <span class="stringliteral"></span>
<a name="l00236"></a>00236 <span class="stringliteral">}</span>
<a name="l00237"></a>00237 <span class="stringliteral">/* </span>
<a name="l00238"></a>00238 <span class="stringliteral">   Semelhante a funcao "</span>Ano()<span class="stringliteral">", mas aceita ate 12 digitos</span>
<a name="l00239"></a>00239 <span class="stringliteral">   */</span>
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_7c4ee3b9d090de7debc8627a9ec467b9_cgraph.png" border="0" usemap="#inserir_8c_7c4ee3b9d090de7debc8627a9ec467b9_cgraph_map" alt=""></center>
<map name="inserir_8c_7c4ee3b9d090de7debc8627a9ec467b9_cgraph_map">
<area shape="rect" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4" title="completa_espacos" alt="" coords="103,6,249,32"><area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="108,56,244,83"><area shape="rect" href="inserir_8c.html#00c6be1b80810a935f1185dc4c2dc32b" title="verifica" alt="" coords="140,107,212,134"></map>
</div>

</div>
</div><p>
<a class="anchor" name="1f918dc0c11be8136b10639811b30ff0"></a><!-- doxytag: member="inserir.c::Autor" ref="1f918dc0c11be8136b10639811b30ff0" args="(FILE *dados)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Autor           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dados</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00188"></a>00188                                          : <span class="stringliteral">", tam_autor);</span>
<a name="l00189"></a>00189 <span class="stringliteral">        remove_espacos();</span>
<a name="l00190"></a>00190 <span class="stringliteral">        fgets(autor, tam_autor+2, stdin);</span>
<a name="l00191"></a>00191 <span class="stringliteral">        while(autor[0] == '\n') {</span>
<a name="l00192"></a>00192 <span class="stringliteral">                printf("</span>Entradas vazias nao sao permitidas\n<span class="stringliteral">");</span>
<a name="l00193"></a>00193 <span class="stringliteral">                printf("</span><a class="code" href="inserir_8c.html#1f918dc0c11be8136b10639811b30ff0">Autor</a> (Ate %d caracteres): <span class="stringliteral">", tam_autor);</span>
<a name="l00194"></a>00194 <span class="stringliteral">                remove_espacos();</span>
<a name="l00195"></a>00195 <span class="stringliteral">                fgets(autor, tam_autor+2, stdin);</span>
<a name="l00196"></a>00196 <span class="stringliteral">        }</span>
<a name="l00197"></a>00197 <span class="stringliteral"></span>
<a name="l00198"></a>00198 <span class="stringliteral"></span>
<a name="l00199"></a>00199 <span class="stringliteral">        completa_espacos(autor, tam_autor);</span>
<a name="l00200"></a>00200 <span class="stringliteral"></span>
<a name="l00201"></a>00201 <span class="stringliteral">        fputs(autor, dados);</span>
<a name="l00202"></a>00202 <span class="stringliteral">        __fpurge(stdin);</span>
<a name="l00203"></a>00203 <span class="stringliteral"></span>
<a name="l00204"></a>00204 <span class="stringliteral">        return;</span>
<a name="l00205"></a>00205 <span class="stringliteral"></span>
<a name="l00206"></a>00206 <span class="stringliteral">}</span>
<a name="l00207"></a>00207 <span class="stringliteral"></span>
<a name="l00208"></a>00208 <span class="stringliteral">/*</span>
<a name="l00209"></a>00209 <span class="stringliteral">   So aceita numeros positivos, indo de 0 ate 9999 (maior numero com 4 digitos), caso nao esteja nesse intervalo, pede para redigitar. O ano tem valor inicial -1, para caso outros caracteres sejam digitado, o valor continue negativo e nao aceite a entrada. Limpa o buffer no final.</span>
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_1f918dc0c11be8136b10639811b30ff0_cgraph.png" border="0" usemap="#inserir_8c_1f918dc0c11be8136b10639811b30ff0_cgraph_map" alt=""></center>
<map name="inserir_8c_1f918dc0c11be8136b10639811b30ff0_cgraph_map">
<area shape="rect" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4" title="completa_espacos" alt="" coords="113,5,260,32"><area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="119,56,255,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="a11e0d6e82a681b31792c378cdc4fbf4"></a><!-- doxytag: member="inserir.c::completa_espacos" ref="a11e0d6e82a681b31792c378cdc4fbf4" args="(char nome[], int tamanho)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void completa_espacos           </td>
          <td>(</td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>nome</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>tamanho</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00081"></a>00081                                                  {
<a name="l00082"></a>00082                 nome[i] = <span class="charliteral">' '</span>;
<a name="l00083"></a>00083         }
<a name="l00084"></a>00084         nome[tamanho] = <span class="charliteral">'\0'</span>;
<a name="l00085"></a>00085 
<a name="l00086"></a>00086 
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 
<a name="l00089"></a>00089 <span class="keywordtype">void</span> <a class="code" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125">remove_espacos</a>() {
<a name="l00090"></a>00090         <span class="keywordtype">char</span> c;
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="17f1761d7fa8ca9ebd96b0e43d43f141"></a><!-- doxytag: member="inserir.c::Imagem" ref="17f1761d7fa8ca9ebd96b0e43d43f141" args="(FILE *dados)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Imagem           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dados</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00275"></a>00275                   {
<a name="l00276"></a>00276                 j=0;
<a name="l00277"></a>00277                 __fpurge(stdin);
<a name="l00278"></a>00278 
<a name="l00279"></a>00279                 printf(<span class="stringliteral">"Nome da imagem (%d caracteres, sendo: 25 + %d numeros + jpg): "</span>, <a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>, <a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>-5);
<a name="l00280"></a>00280                 <a class="code" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125">remove_espacos</a>();
<a name="l00281"></a>00281                 fgets(imagem, <a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>+1, stdin);
<a name="l00282"></a>00282                 __fpurge(stdin);
<a name="l00283"></a>00283 
<a name="l00284"></a>00284                 <span class="keywordflow">if</span>(imagem[0] == <span class="charliteral">'\n'</span>) {
<a name="l00285"></a>00285                         printf(<span class="stringliteral">"Entradas vazias nao sao permitidas\n"</span>);
<a name="l00286"></a>00286                         <span class="keywordflow">continue</span>;
<a name="l00287"></a>00287                 }
<a name="l00288"></a>00288 
<a name="l00289"></a>00289                 j = <a class="code" href="inserir_8c.html#9c79d622ec1a91518808ee0a01f04095">verifica_img</a> (<a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>, imagem);  
<a name="l00290"></a>00290 
<a name="l00291"></a>00291                 <span class="keywordflow">if</span>(j&lt;<a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>-3) { 
<a name="l00292"></a>00292                         printf(<span class="stringliteral">"Digite 25, em seguida o identificador (%d numeros) e a extensao da imagem.\n"</span>, <a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>-5);
<a name="l00293"></a>00293                         <span class="keywordflow">continue</span>;
<a name="l00294"></a>00294                 }
<a name="l00295"></a>00295 
<a name="l00296"></a>00296                 <span class="keywordflow">if</span>((imagem[<a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>-3] != <span class="charliteral">'j'</span>) || (imagem[<a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>-2] != <span class="charliteral">'p'</span>) || (imagem[<a class="code" href="consulta_8h.html#f82c01d3405340b2545ba6d5593d2ee5">tam_imagem</a>-1] != <span class="charliteral">'g'</span>)) {
<a name="l00297"></a>00297                         printf(<span class="stringliteral">"A extensao deve ser \"jpg\"\n"</span>);
<a name="l00298"></a>00298                         <span class="keywordflow">continue</span>;
<a name="l00299"></a>00299                 }
<a name="l00300"></a>00300 
<a name="l00301"></a>00301                 <span class="keywordflow">else</span> {
<a name="l00302"></a>00302                         <span class="keywordflow">break</span>;
<a name="l00303"></a>00303                 }
<a name="l00304"></a>00304 
<a name="l00305"></a>00305         }
<a name="l00306"></a>00306         __fpurge(stdin);
<a name="l00307"></a>00307         fputs(imagem, dados);
<a name="l00308"></a>00308 }
<a name="l00309"></a>00309 
<a name="l00310"></a>00310 
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_17f1761d7fa8ca9ebd96b0e43d43f141_cgraph.png" border="0" usemap="#inserir_8c_17f1761d7fa8ca9ebd96b0e43d43f141_cgraph_map" alt=""></center>
<map name="inserir_8c_17f1761d7fa8ca9ebd96b0e43d43f141_cgraph_map">
<area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="131,5,267,32"><area shape="rect" href="inserir_8c.html#9c79d622ec1a91518808ee0a01f04095" title="verifica_img" alt="" coords="148,56,249,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="09e188938102b40356eb2042f8237316"></a><!-- doxytag: member="inserir.c::insere" ref="09e188938102b40356eb2042f8237316" args="(int tamanho, FILE *base, char tit[], pNo_PK *obras)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int insere           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>tamanho</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>tit</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structNo__PK.html">pNo_PK</a> *&nbsp;</td>
          <td class="paramname"> <em>obras</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00021"></a>00021                                                                 {
<a name="l00022"></a>00022                 FILE * avail_head;
<a name="l00023"></a>00023                 <span class="keywordtype">int</span> atual;
<a name="l00024"></a>00024                 <span class="keywordtype">int</span> nrr;
<a name="l00025"></a>00025                 <span class="keywordtype">char</span> aux[6];
<a name="l00026"></a>00026         
<a name="l00027"></a>00027                 nrr = <a class="code" href="inserir_8c.html#3984be3dc5afb73ad6b108f75442d6ec">verifica_avail</a>();
<a name="l00028"></a>00028         
<a name="l00029"></a>00029                 <span class="comment">/* insere no final do base.dat */</span>
<a name="l00030"></a>00030                 <span class="keywordflow">if</span>(nrr == -1) {
<a name="l00031"></a>00031                         <a class="code" href="inserir_8c.html#c2f31d719ada641e76a5f5192bda2c38">Titulo</a>(obras,tit,base,tamanho); <span class="comment">/* adiciona um novo titulo */</span> 
<a name="l00032"></a>00032                         <a class="code" href="inserir_8c.html#86f4c9d5af1f3c351dfd4989c7e0e050">Tipo</a>(base);
<a name="l00033"></a>00033                         <a class="code" href="inserir_8c.html#1f918dc0c11be8136b10639811b30ff0">Autor</a>(base);
<a name="l00034"></a>00034                         <a class="code" href="inserir_8c.html#7c4ee3b9d090de7debc8627a9ec467b9">Ano</a>(base);
<a name="l00035"></a>00035                         <a class="code" href="inserir_8c.html#f3d37b1e5047923e2f386e2d6e035173">Valor</a>(base);
<a name="l00036"></a>00036                         <a class="code" href="inserir_8c.html#17f1761d7fa8ca9ebd96b0e43d43f141">Imagem</a>(base);
<a name="l00037"></a>00037                         printf(<span class="stringliteral">"\nAdicionado a Base de Dados!\n\n"</span>);
<a name="l00038"></a>00038                         fclose(base);
<a name="l00039"></a>00039                                 <span class="keywordflow">return</span> 1;
<a name="l00040"></a>00040                 }
<a name="l00041"></a>00041         
<a name="l00042"></a>00042                 <span class="comment">/* insere no espaco disponivel da avail list */</span>
<a name="l00043"></a>00043                 <span class="keywordflow">else</span> {
<a name="l00044"></a>00044                         fclose(base);
<a name="l00045"></a>00045                                 base = fopen(<span class="stringliteral">"base25.dat"</span>, <span class="stringliteral">"r+"</span>);
<a name="l00046"></a>00046                                 
<a name="l00047"></a>00047                                 atual = (nrr - 1) * <a class="code" href="consulta_8h.html#63e82776cfea43a18ab091e7d3a01b13">tam_total</a>;
<a name="l00048"></a>00048 
<a name="l00049"></a>00049                         <span class="comment">/* armazena na string aux o nrr que esta no espaco disponivel da avail list */</span>
<a name="l00050"></a>00050                                 fseek(base, atual, SEEK_SET);   
<a name="l00051"></a>00051                                 fgets(aux, 5, base);
<a name="l00052"></a>00052                                 aux[5] = <span class="charliteral">'\0'</span>;  
<a name="l00053"></a>00053 
<a name="l00054"></a>00054                         <span class="comment">/* insere no espaco disponivel */</span>
<a name="l00055"></a>00055                                 fseek(base, atual, SEEK_SET);           <a class="code" href="inserir_8c.html#c2f31d719ada641e76a5f5192bda2c38">Titulo</a>(obras,tit,base,tamanho); <span class="comment">/* adiciona um novo titulo */</span>
<a name="l00056"></a>00056                         <a class="code" href="inserir_8c.html#86f4c9d5af1f3c351dfd4989c7e0e050">Tipo</a>(base);
<a name="l00057"></a>00057                         <a class="code" href="inserir_8c.html#1f918dc0c11be8136b10639811b30ff0">Autor</a>(base);
<a name="l00058"></a>00058                         <a class="code" href="inserir_8c.html#7c4ee3b9d090de7debc8627a9ec467b9">Ano</a>(base);
<a name="l00059"></a>00059                         <a class="code" href="inserir_8c.html#f3d37b1e5047923e2f386e2d6e035173">Valor</a>(base);
<a name="l00060"></a>00060                         <a class="code" href="inserir_8c.html#17f1761d7fa8ca9ebd96b0e43d43f141">Imagem</a>(base);
<a name="l00061"></a>00061                         printf(<span class="stringliteral">"\nAdicionado a Base de Dados!\n\n"</span>);
<a name="l00062"></a>00062                         fclose(base);   
<a name="l00063"></a>00063                                 <span class="comment">/* coloca o nrr que estava no espaco disponivel para o inicio da avail list */</span>
<a name="l00064"></a>00064                                 avail_head = fopen(<span class="stringliteral">"avail_head.dat"</span>, <span class="stringliteral">"r+"</span>);
<a name="l00065"></a>00065                                 fputs(aux, avail_head);
<a name="l00066"></a>00066                                 fclose(avail_head);
<a name="l00067"></a>00067                                 
<a name="l00068"></a>00068                                 <span class="keywordflow">return</span> 0;
<a name="l00069"></a>00069                 }
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 <span class="comment">/*</span>
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_09e188938102b40356eb2042f8237316_cgraph.png" border="0" usemap="#inserir_8c_09e188938102b40356eb2042f8237316_cgraph_map" alt=""></center>
<map name="inserir_8c_09e188938102b40356eb2042f8237316_cgraph_map">
<area shape="rect" href="inserir_8c.html#7c4ee3b9d090de7debc8627a9ec467b9" title="Ano" alt="" coords="149,5,195,32"><area shape="rect" href="inserir_8c.html#1f918dc0c11be8136b10639811b30ff0" title="Autor" alt="" coords="143,157,201,184"><area shape="rect" href="inserir_8c.html#17f1761d7fa8ca9ebd96b0e43d43f141" title="Imagem" alt="" coords="135,258,209,285"><area shape="rect" href="inserir_8c.html#86f4c9d5af1f3c351dfd4989c7e0e050" title="Tipo" alt="" coords="148,106,196,133"><area shape="rect" href="inserir_8c.html#c2f31d719ada641e76a5f5192bda2c38" title="Titulo" alt="" coords="143,208,201,234"><area shape="rect" href="inserir_8c.html#f3d37b1e5047923e2f386e2d6e035173" title="Valor" alt="" coords="145,56,199,82"><area shape="rect" href="inserir_8c.html#3984be3dc5afb73ad6b108f75442d6ec" title="verifica_avail" alt="" coords="119,309,225,336"><area shape="rect" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4" title="completa_espacos" alt="" coords="276,106,423,133"><area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="281,157,417,184"><area shape="rect" href="inserir_8c.html#00c6be1b80810a935f1185dc4c2dc32b" title="verifica" alt="" coords="313,30,385,57"><area shape="rect" href="inserir_8c.html#9c79d622ec1a91518808ee0a01f04095" title="verifica_img" alt="" coords="299,258,400,285"><area shape="rect" href="consulta_8c.html#c3f135f977e97ce51bde811fe4850fb7" title="compara" alt="" coords="309,208,389,234"></map>
</div>

</div>
</div><p>
<a class="anchor" name="ca633dc542efdd5fd5748989918dd125"></a><!-- doxytag: member="inserir.c::remove_espacos" ref="ca633dc542efdd5fd5748989918dd125" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_espacos           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00093"></a>00093                       {
<a name="l00094"></a>00094                 c=getchar();
<a name="l00095"></a>00095         }
<a name="l00096"></a>00096         ungetc(c, stdin);
<a name="l00097"></a>00097 
<a name="l00098"></a>00098         <span class="keywordflow">return</span>;
<a name="l00099"></a>00099 }
<a name="l00100"></a>00100 
<a name="l00101"></a>00101 <span class="keywordtype">int</span> <a class="code" href="inserir_8c.html#00c6be1b80810a935f1185dc4c2dc32b">verifica</a>(<span class="keywordtype">int</span> tamanho, <span class="keywordtype">char</span> *<span class="keywordtype">string</span>) {
<a name="l00102"></a>00102         <span class="keywordtype">int</span> i=0, v=0;   
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="86f4c9d5af1f3c351dfd4989c7e0e050"></a><!-- doxytag: member="inserir.c::Tipo" ref="86f4c9d5af1f3c351dfd4989c7e0e050" args="(FILE *dados)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Tipo           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dados</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00161"></a>00161                                         : <span class="stringliteral">", tam_tipo);</span>
<a name="l00162"></a>00162 <span class="stringliteral">        remove_espacos();</span>
<a name="l00163"></a>00163 <span class="stringliteral">        fgets(tipo, tam_tipo+2, stdin);</span>
<a name="l00164"></a>00164 <span class="stringliteral"></span>
<a name="l00165"></a>00165 <span class="stringliteral">        while(tipo[0] == '\n') {</span>
<a name="l00166"></a>00166 <span class="stringliteral">                printf("</span>Entradas vazias nao sao permitidas\n<span class="stringliteral">");</span>
<a name="l00167"></a>00167 <span class="stringliteral">                printf("</span><a class="code" href="inserir_8c.html#86f4c9d5af1f3c351dfd4989c7e0e050">Tipo</a> (Ate %d caracteres): <span class="stringliteral">", tam_tipo);</span>
<a name="l00168"></a>00168 <span class="stringliteral">                remove_espacos();</span>
<a name="l00169"></a>00169 <span class="stringliteral">                fgets(tipo, tam_tipo+2, stdin);</span>
<a name="l00170"></a>00170 <span class="stringliteral">        }</span>
<a name="l00171"></a>00171 <span class="stringliteral"></span>
<a name="l00172"></a>00172 <span class="stringliteral">        completa_espacos(tipo, tam_tipo);</span>
<a name="l00173"></a>00173 <span class="stringliteral"></span>
<a name="l00174"></a>00174 <span class="stringliteral"></span>
<a name="l00175"></a>00175 <span class="stringliteral">        fputs(tipo, dados);</span>
<a name="l00176"></a>00176 <span class="stringliteral">        __fpurge(stdin);</span>
<a name="l00177"></a>00177 <span class="stringliteral"></span>
<a name="l00178"></a>00178 <span class="stringliteral">        return;</span>
<a name="l00179"></a>00179 <span class="stringliteral"></span>
<a name="l00180"></a>00180 <span class="stringliteral">}</span>
<a name="l00181"></a>00181 <span class="stringliteral"></span>
<a name="l00182"></a>00182 <span class="stringliteral">/*</span>
<a name="l00183"></a>00183 <span class="stringliteral">   Igual a funcao "</span>Tipo()<span class="stringliteral">".</span>
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_86f4c9d5af1f3c351dfd4989c7e0e050_cgraph.png" border="0" usemap="#inserir_8c_86f4c9d5af1f3c351dfd4989c7e0e050_cgraph_map" alt=""></center>
<map name="inserir_8c_86f4c9d5af1f3c351dfd4989c7e0e050_cgraph_map">
<area shape="rect" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4" title="completa_espacos" alt="" coords="103,5,249,32"><area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="108,56,244,83"></map>
</div>

</div>
</div><p>
<a class="anchor" name="c2f31d719ada641e76a5f5192bda2c38"></a><!-- doxytag: member="inserir.c::Titulo" ref="c2f31d719ada641e76a5f5192bda2c38" args="(pNo_PK obras, char *novo, FILE *dados, int tamanho_vetor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Titulo           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structNo__PK.html">pNo_PK</a>&nbsp;</td>
          <td class="paramname"> <em>obras</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>novo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dados</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>tamanho_vetor</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00131"></a>00131                     {
<a name="l00132"></a>00132                 printf(<span class="stringliteral">"Titulo (Ate %d caracteres): "</span>, <a class="code" href="consulta_8h.html#4e08e3da16a5821367047709c8f0f2a6">tam_titulo</a>);     
<a name="l00133"></a>00133                 <a class="code" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125">remove_espacos</a>();
<a name="l00134"></a>00134                 fgets(titulo, <a class="code" href="consulta_8h.html#4e08e3da16a5821367047709c8f0f2a6">tam_titulo</a>+2, stdin);
<a name="l00135"></a>00135                 <span class="keywordflow">if</span> (titulo[0] == <span class="charliteral">'\n'</span>) {
<a name="l00136"></a>00136                         printf(<span class="stringliteral">"Entradas vazias nao sao permitidas\n"</span>);
<a name="l00137"></a>00137                         <span class="keywordflow">continue</span>;
<a name="l00138"></a>00138                 }
<a name="l00139"></a>00139                 <a class="code" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4">completa_espacos</a>(titulo, <a class="code" href="consulta_8h.html#4e08e3da16a5821367047709c8f0f2a6">tam_titulo</a>);
<a name="l00140"></a>00140                 <span class="keywordflow">if</span> (bsearch (titulo, obras, tamanho_vetor, <span class="keyword">sizeof</span> (<span class="keyword">struct</span> <a class="code" href="structNo__PK.html">No_PK</a>), <a class="code" href="consulta_8c.html#c3f135f977e97ce51bde811fe4850fb7">compara</a>)) {
<a name="l00141"></a>00141                         printf(<span class="stringliteral">"Essa obra ja foi incluida!\n"</span>);
<a name="l00142"></a>00142                 }
<a name="l00143"></a>00143                 <span class="keywordflow">else</span> {
<a name="l00144"></a>00144                         <span class="keywordflow">break</span>;
<a name="l00145"></a>00145                 }
<a name="l00146"></a>00146         }
<a name="l00147"></a>00147         fputs(titulo, dados);
<a name="l00148"></a>00148         __fpurge(stdin);
<a name="l00149"></a>00149 
<a name="l00150"></a>00150         strcpy(novo,titulo);
<a name="l00151"></a>00151 
<a name="l00152"></a>00152 }
<a name="l00153"></a>00153 
<a name="l00154"></a>00154 <span class="comment">/*</span>
<a name="l00155"></a>00155 <span class="comment">   Semelhante a funcao "Titulo()".</span>
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_c2f31d719ada641e76a5f5192bda2c38_cgraph.png" border="0" usemap="#inserir_8c_c2f31d719ada641e76a5f5192bda2c38_cgraph_map" alt=""></center>
<map name="inserir_8c_c2f31d719ada641e76a5f5192bda2c38_cgraph_map">
<area shape="rect" href="consulta_8c.html#c3f135f977e97ce51bde811fe4850fb7" title="compara" alt="" coords="147,6,227,32"><area shape="rect" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4" title="completa_espacos" alt="" coords="113,56,260,83"><area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="119,107,255,134"></map>
</div>

</div>
</div><p>
<a class="anchor" name="f3d37b1e5047923e2f386e2d6e035173"></a><!-- doxytag: member="inserir.c::Valor" ref="f3d37b1e5047923e2f386e2d6e035173" args="(FILE *dados)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Valor           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>dados</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00245"></a>00245                                       : <span class="stringliteral">", tam_valor);</span>
<a name="l00246"></a>00246 <span class="stringliteral">        remove_espacos();</span>
<a name="l00247"></a>00247 <span class="stringliteral">        fgets(valor, tam_valor+2, stdin);</span>
<a name="l00248"></a>00248 <span class="stringliteral">        j = verifica(tam_valor, valor);</span>
<a name="l00249"></a>00249 <span class="stringliteral">        while(valor[0] == '\n' || j != 0) {</span>
<a name="l00250"></a>00250 <span class="stringliteral"></span>
<a name="l00251"></a>00251 <span class="stringliteral">                j=0;</span>
<a name="l00252"></a>00252 <span class="stringliteral">                printf("</span>Entrada invalida, redigite por favor.\n<span class="stringliteral">");</span>
<a name="l00253"></a>00253 <span class="stringliteral">                printf("</span><a class="code" href="inserir_8c.html#f3d37b1e5047923e2f386e2d6e035173">Valor</a> (Ate %d numeros): <span class="stringliteral">", tam_valor);</span>
<a name="l00254"></a>00254 <span class="stringliteral">                remove_espacos();</span>
<a name="l00255"></a>00255 <span class="stringliteral">                fgets(valor, tam_valor+2, stdin);</span>
<a name="l00256"></a>00256 <span class="stringliteral">                __fpurge(stdin);</span>
<a name="l00257"></a>00257 <span class="stringliteral">                j = verifica(tam_valor, valor);</span>
<a name="l00258"></a>00258 <span class="stringliteral">        }               </span>
<a name="l00259"></a>00259 <span class="stringliteral"></span>
<a name="l00260"></a>00260 <span class="stringliteral">        completa_espacos(valor, tam_valor);</span>
<a name="l00261"></a>00261 <span class="stringliteral">        __fpurge(stdin);</span>
<a name="l00262"></a>00262 <span class="stringliteral">        fputs(valor, dados);</span>
<a name="l00263"></a>00263 <span class="stringliteral"></span>
<a name="l00264"></a>00264 <span class="stringliteral">}</span>
<a name="l00265"></a>00265 <span class="stringliteral">/*</span>
<a name="l00266"></a>00266 <span class="stringliteral">   A imagem eh uma string com "</span>tamanho<span class="stringliteral">" caracteres, sendo os "</span>tamanho-3<span class="stringliteral">" primeiros apenas numeros, os 3 proximos a extensao "</span>jpg<span class="stringliteral">" e o ultimo o "</span>\0<span class="stringliteral">". A funcao "</span>isdigit<span class="stringliteral">" retorna 0 caso o caractere nao seja um numero e algum numero diferente de 0 caso seja um numero. Assim, testamos para cada um dos "</span>tamanho-3<span class="stringliteral">" primeiros caracteres e adicionamos 1 a "</span>j<span class="stringliteral">" (variavel auxiliar) se for um numero. Caso j&lt;"</span>tamanho-3<span class="stringliteral">", nem todos sao numeros e a entrada nao deve ser aceita. A entrada tambem deve ter "</span>jpg<span class="stringliteral">" como extensao.</span>
<a name="l00267"></a>00267 <span class="stringliteral">   Caso mais de "</span>tamanho<span class="stringliteral">" caracteres forem digitados, ignora a partir do caractere "</span>tamanho+1<span class="stringliteral">" e limpa o buffer no final.</span>
</pre></div>
<p>

<p>
<div class="dynheader">
Este é o grafo de chamadas para esta função:</div>
<div class="dynsection">
<p><center><img src="inserir_8c_f3d37b1e5047923e2f386e2d6e035173_cgraph.png" border="0" usemap="#inserir_8c_f3d37b1e5047923e2f386e2d6e035173_cgraph_map" alt=""></center>
<map name="inserir_8c_f3d37b1e5047923e2f386e2d6e035173_cgraph_map">
<area shape="rect" href="inserir_8c.html#a11e0d6e82a681b31792c378cdc4fbf4" title="completa_espacos" alt="" coords="108,6,255,32"><area shape="rect" href="inserir_8c.html#ca633dc542efdd5fd5748989918dd125" title="remove_espacos" alt="" coords="113,56,249,83"><area shape="rect" href="inserir_8c.html#00c6be1b80810a935f1185dc4c2dc32b" title="verifica" alt="" coords="145,107,217,134"></map>
</div>

</div>
</div><p>
<a class="anchor" name="00c6be1b80810a935f1185dc4c2dc32b"></a><!-- doxytag: member="inserir.c::verifica" ref="00c6be1b80810a935f1185dc4c2dc32b" args="(int tamanho, char *string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int verifica           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>tamanho</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>string</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00104"></a>00104                                         {
<a name="l00105"></a>00105                         v = 1;
<a name="l00106"></a>00106                         <span class="keywordflow">break</span>;
<a name="l00107"></a>00107                 }
<a name="l00108"></a>00108 
<a name="l00109"></a>00109                 i++;
<a name="l00110"></a>00110         }
<a name="l00111"></a>00111         <span class="keywordflow">return</span> v;
<a name="l00112"></a>00112 }
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 <span class="keywordtype">int</span> <a class="code" href="inserir_8c.html#9c79d622ec1a91518808ee0a01f04095">verifica_img</a>(<span class="keywordtype">int</span> tamanho, <span class="keywordtype">char</span> imagem[]) {
<a name="l00115"></a>00115         <span class="keywordtype">int</span> i, j=0;
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="3984be3dc5afb73ad6b108f75442d6ec"></a><!-- doxytag: member="inserir.c::verifica_avail" ref="3984be3dc5afb73ad6b108f75442d6ec" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int verifica_avail           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00004"></a>00004                      {
<a name="l00005"></a>00005         
<a name="l00006"></a>00006                 <span class="keywordtype">char</span> aux[6];
<a name="l00007"></a>00007                 FILE * avail_head;
<a name="l00008"></a>00008                 
<a name="l00009"></a>00009                 avail_head = fopen(<span class="stringliteral">"avail_head.dat"</span>, <span class="stringliteral">"r"</span>);
<a name="l00010"></a>00010                 
<a name="l00011"></a>00011                 fgets(aux, 5,avail_head);
<a name="l00012"></a>00012                 aux[5] = <span class="charliteral">'\0'</span>;
<a name="l00013"></a>00013         
<a name="l00014"></a>00014                 fclose(avail_head);
<a name="l00015"></a>00015                 
<a name="l00016"></a>00016                 <span class="keywordflow">return</span> atoi(aux);
<a name="l00017"></a>00017                 
<a name="l00018"></a>00018 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="9c79d622ec1a91518808ee0a01f04095"></a><!-- doxytag: member="inserir.c::verifica_img" ref="9c79d622ec1a91518808ee0a01f04095" args="(int tamanho, char imagem[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int verifica_img           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>tamanho</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&nbsp;</td>
          <td class="paramname"> <em>imagem</em>[]</td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<div class="fragment"><pre class="fragment"><a name="l00117"></a>00117                                        {
<a name="l00118"></a>00118                         j++;
<a name="l00119"></a>00119                 }
<a name="l00120"></a>00120         }
<a name="l00121"></a>00121         <span class="keywordflow">if</span> (imagem[0] != <span class="charliteral">'2'</span> || imagem[1] != <span class="charliteral">'5'</span>) {
<a name="l00122"></a>00122                 j=0;
<a name="l00123"></a>00123         }
<a name="l00124"></a>00124         <span class="keywordflow">return</span> j;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 <span class="keywordtype">void</span> <a class="code" href="inserir_8c.html#c2f31d719ada641e76a5f5192bda2c38">Titulo</a>(<a class="code" href="structNo__PK.html">pNo_PK</a> obras, <span class="keywordtype">char</span> *novo, FILE * dados, <span class="keywordtype">int</span> tamanho_vetor) {
<a name="l00128"></a>00128         <span class="keywordtype">char</span> titulo[<a class="code" href="consulta_8h.html#4e08e3da16a5821367047709c8f0f2a6">tam_titulo</a>+1];
</pre></div>
<p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Gerado em Mon Apr 28 16:38:41 2008 para Catalago de Obras - Grupo 25 por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>
